export default {
  Printer: {
    form: {
      fields: [
        'store',
        {
          property: 'type',
          default_value: 'XPY-POS',
          component: {
            props: ['form', 'property'],
            render(h) {
              return (
                <el-select v-model={this.form[this.property]} filterable placeholder='打印机类型' disabled={true}>{
                  [
                    { label: '易联云', value: 'YLY' },
                    { label: '芯烨云标签机', value: 'XPY' },
                    { label: '芯烨云小票机', value: 'XPY-POS' }
                  ]
                    .map(printer => {
                      return <el-option key={printer.value} label={printer.label} value={printer.value} />
                    })
                }</el-select>
              )
            }
          }
        },
        'machineCode',
        'extraData',
        { property: 'description', field_options: { label: '名称' }, type: 'textarea' }
      ]
    },
    list: {
      list_display: [
        'id',
        'store',
        'type',
        'machineCode',
        { property: 'description', label: '名称' }
      ]
    }
  }
}
